/**
 * 
 */
package t4j.strings;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

import t4j.net.mindview.util.TextFile;

/**
 * @author sz
 * 
 *         create time：2012-11-29
 */
public class JGrep {
	public static void main(String[] args) {
	
		Pattern p = Pattern.compile("\\b[Ssct]\\w+");
		
		int index= 0;
		
		Matcher m = p.matcher("");
		
		for(String line : new TextFile("src\\t4j\\strings\\JGrep.java")){
			
			System.out.println("------------"+line);
		
System.out.println(m.reset(line));			
			while(m.find())
				System.out.println(index++ + ": "+ m.group() + ": " + m.start());
		}
	}
}
